<?php

namespace App\Services\Base;
use App\Models\Base\Config;
use App\Services\BaseService;

/**
 * 系统键值配置业务类
 *
 * @author WangBin
 * @date 2021-09-24
 * @package App\Http\Services
 */
class ConfigService extends BaseService
{
    /**
     * 获取系统kv的值
     *
     * @param string $key
     * @return
     */
    public function get(string $key)
    {
        if(empty($key)) {
            return '';
        }
        return Config::query()->where('config_key', $key)->first()->value;
    }
}
